3.369 \(\int \frac{\tan ^6(e+f x)}{(a+b \sec ^2(e+f x))^3} \, dx\)

Optimal. Leaf size=147 \[ -\frac{(3 a-4 b) (a+b) \tan (e+f x)}{8 a^2 b^2 f \left (a+b \tan ^2(e+f x)+b\right )}+\frac{\sqrt{a+b} \left (3 a^2-4 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{8 a^3 b^{5/2} f}-\frac{x}{a^3}-\frac{(a+b) \tan ^3(e+f x)}{4 a b f \left (a+b \tan ^2(e+f x)+b\right )^2} \]

[Out]

-(x/a^3) + (Sqrt[a + b]*(3*a^2 - 4*a*b + 8*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(8*a^3*b^(5/2)*f)
- ((a + b)*Tan[e + f*x]^3)/(4*a*b*f*(a + b + b*Tan[e + f*x]^2)^2) - ((3*a - 4*b)*(a + b)*Tan[e + f*x])/(8*a^2*
b^2*f*(a + b + b*Tan[e + f*x]^2))

________________________________________________________________________________________

Rubi [A]  time = 0.292408, antiderivative size = 147, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.304, Rules used = {4141, 1975, 470, 578, 522, 203, 205} \[ -\frac{(3 a-4 b) (a+b) \tan (e+f x)}{8 a^2 b^2 f \left (a+b \tan ^2(e+f x)+b\right )}+\frac{\sqrt{a+b} \left (3 a^2-4 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{8 a^3 b^{5/2} f}-\frac{x}{a^3}-\frac{(a+b) \tan ^3(e+f x)}{4 a b f \left (a+b \tan ^2(e+f x)+b\right )^2} \]

Antiderivative was successfully verified.

[In]

Int[Tan[e + f*x]^6/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

-(x/a^3) + (Sqrt[a + b]*(3*a^2 - 4*a*b + 8*b^2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(8*a^3*b^(5/2)*f)
- ((a + b)*Tan[e + f*x]^3)/(4*a*b*f*(a + b + b*Tan[e + f*x]^2)^2) - ((3*a - 4*b)*(a + b)*Tan[e + f*x])/(8*a^2*
b^2*f*(a + b + b*Tan[e + f*x]^2))

Rule 4141

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[((d*ff*x)^m*(a + b*(1 + ff^2*x^2)^(n/2))^p)/(1 + ff^
2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m, p}, x] && IntegerQ[n/2] && (IntegerQ[m/2] ||
EqQ[n, 2])

Rule 1975

Int[(u_)^(p_.)*(v_)^(q_.)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[(e*x)^m*ExpandToSum[u, x]^p*ExpandToSum[v, x]^q
, x] /; FreeQ[{e, m, p, q}, x] && BinomialQ[{u, v}, x] && EqQ[BinomialDegree[u, x] - BinomialDegree[v, x], 0]
&&  !BinomialMatchQ[{u, v}, x]

Rule 470

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(a*e^(2
*n - 1)*(e*x)^(m - 2*n + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(b*n*(b*c - a*d)*(p + 1)), x] + Dist[e^(2
*n)/(b*n*(b*c - a*d)*(p + 1)), Int[(e*x)^(m - 2*n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[a*c*(m - 2*n + 1) +
(a*d*(m - n + n*q + 1) + b*c*n*(p + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[n, 0] && LtQ[p, -1] && GtQ[m - n + 1, n] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 578

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_)*((e_) + (f_.)*(x_)^(n_)), x
_Symbol] :> Simp[(g^(n - 1)*(b*e - a*f)*(g*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(b*n*(b*c -
 a*d)*(p + 1)), x] - Dist[g^n/(b*n*(b*c - a*d)*(p + 1)), Int[(g*x)^(m - n)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*S
imp[c*(b*e - a*f)*(m - n + 1) + (d*(b*e - a*f)*(m + n*q + 1) - b*n*(c*f - d*e)*(p + 1))*x^n, x], x], x] /; Fre
eQ[{a, b, c, d, e, f, g, q}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m - n + 1, 0]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\tan ^6(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^6}{\left (1+x^2\right ) \left (a+b \left (1+x^2\right )\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \frac{x^6}{\left (1+x^2\right ) \left (a+b+b x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{(a+b) \tan ^3(e+f x)}{4 a b f \left (a+b+b \tan ^2(e+f x)\right )^2}+\frac{\operatorname{Subst}\left (\int \frac{x^2 \left (3 (a+b)+(3 a-b) x^2\right )}{\left (1+x^2\right ) \left (a+b+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{4 a b f}\\ &=-\frac{(a+b) \tan ^3(e+f x)}{4 a b f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac{(3 a-4 b) (a+b) \tan (e+f x)}{8 a^2 b^2 f \left (a+b+b \tan ^2(e+f x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{-(3 a-4 b) (a+b)+\left (-3 a^2+a b-4 b^2\right ) x^2}{\left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{8 a^2 b^2 f}\\ &=-\frac{(a+b) \tan ^3(e+f x)}{4 a b f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac{(3 a-4 b) (a+b) \tan (e+f x)}{8 a^2 b^2 f \left (a+b+b \tan ^2(e+f x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{a^3 f}+\frac{\left ((a+b) \left (3 a^2-4 a b+8 b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+b+b x^2} \, dx,x,\tan (e+f x)\right )}{8 a^3 b^2 f}\\ &=-\frac{x}{a^3}+\frac{\sqrt{a+b} \left (3 a^2-4 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a+b}}\right )}{8 a^3 b^{5/2} f}-\frac{(a+b) \tan ^3(e+f x)}{4 a b f \left (a+b+b \tan ^2(e+f x)\right )^2}-\frac{(3 a-4 b) (a+b) \tan (e+f x)}{8 a^2 b^2 f \left (a+b+b \tan ^2(e+f x)\right )}\\ \end{align*}

Mathematica [C]  time = 6.52417, size = 760, normalized size = 5.17 \[ \frac{\sec (2 e) \sec ^6(e+f x) (a \cos (2 e+2 f x)+a+2 b) \left (-20 a^2 b^2 \sin (4 e+2 f x)+6 a^2 b^2 \sin (2 e+4 f x)-24 a^2 b^2 f x \cos (2 e)-16 a^2 b^2 f x \cos (4 e+2 f x)-4 a^2 b^2 f x \cos (2 e+4 f x)-4 a^2 b^2 f x \cos (6 e+4 f x)-18 a^2 b^2 \sin (2 e)+28 a^2 b^2 \sin (2 f x)-16 a^2 b^2 f x \cos (2 f x)-a^3 b \sin (4 e+2 f x)+3 a^3 b \sin (2 e+4 f x)+15 a^3 b \sin (2 e)-13 a^3 b \sin (2 f x)+3 a^4 \sin (4 e+2 f x)-3 a^4 \sin (2 e+4 f x)+9 a^4 \sin (2 e)-9 a^4 \sin (2 f x)-16 a b^3 \sin (4 e+2 f x)-64 a b^3 f x \cos (2 e)-32 a b^3 f x \cos (4 e+2 f x)-72 a b^3 \sin (2 e)+32 a b^3 \sin (2 f x)-32 a b^3 f x \cos (2 f x)-64 b^4 f x \cos (2 e)-48 b^4 \sin (2 e)\right )}{128 a^3 b^2 f \left (a+b \sec ^2(e+f x)\right )^3}+\frac{\left (a^2 b-3 a^3-4 a b^2-8 b^3\right ) \sec ^6(e+f x) (a \cos (2 e+2 f x)+a+2 b)^3 \left (\frac{\cos (2 e) \tan ^{-1}\left (\sec (f x) \left (\frac{\cos (2 e)}{2 \sqrt{a+b} \sqrt{b \cos (4 e)-i b \sin (4 e)}}-\frac{i \sin (2 e)}{2 \sqrt{a+b} \sqrt{b \cos (4 e)-i b \sin (4 e)}}\right ) (a \sin (2 e+f x)-a \sin (f x)-2 b \sin (f x))\right )}{64 a^3 b^2 f \sqrt{a+b} \sqrt{b \cos (4 e)-i b \sin (4 e)}}-\frac{i \sin (2 e) \tan ^{-1}\left (\sec (f x) \left (\frac{\cos (2 e)}{2 \sqrt{a+b} \sqrt{b \cos (4 e)-i b \sin (4 e)}}-\frac{i \sin (2 e)}{2 \sqrt{a+b} \sqrt{b \cos (4 e)-i b \sin (4 e)}}\right ) (a \sin (2 e+f x)-a \sin (f x)-2 b \sin (f x))\right )}{64 a^3 b^2 f \sqrt{a+b} \sqrt{b \cos (4 e)-i b \sin (4 e)}}\right )}{\left (a+b \sec ^2(e+f x)\right )^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[e + f*x]^6/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

((-3*a^3 + a^2*b - 4*a*b^2 - 8*b^3)*(a + 2*b + a*Cos[2*e + 2*f*x])^3*Sec[e + f*x]^6*((ArcTan[Sec[f*x]*(Cos[2*e
]/(2*Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]) - ((I/2)*Sin[2*e])/(Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*
e]]))*(-(a*Sin[f*x]) - 2*b*Sin[f*x] + a*Sin[2*e + f*x])]*Cos[2*e])/(64*a^3*b^2*Sqrt[a + b]*f*Sqrt[b*Cos[4*e] -
 I*b*Sin[4*e]]) - ((I/64)*ArcTan[Sec[f*x]*(Cos[2*e]/(2*Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]) - ((I/2)*S
in[2*e])/(Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]))*(-(a*Sin[f*x]) - 2*b*Sin[f*x] + a*Sin[2*e + f*x])]*Sin
[2*e])/(a^3*b^2*Sqrt[a + b]*f*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]])))/(a + b*Sec[e + f*x]^2)^3 + ((a + 2*b + a*Cos[
2*e + 2*f*x])*Sec[2*e]*Sec[e + f*x]^6*(-24*a^2*b^2*f*x*Cos[2*e] - 64*a*b^3*f*x*Cos[2*e] - 64*b^4*f*x*Cos[2*e]
- 16*a^2*b^2*f*x*Cos[2*f*x] - 32*a*b^3*f*x*Cos[2*f*x] - 16*a^2*b^2*f*x*Cos[4*e + 2*f*x] - 32*a*b^3*f*x*Cos[4*e
 + 2*f*x] - 4*a^2*b^2*f*x*Cos[2*e + 4*f*x] - 4*a^2*b^2*f*x*Cos[6*e + 4*f*x] + 9*a^4*Sin[2*e] + 15*a^3*b*Sin[2*
e] - 18*a^2*b^2*Sin[2*e] - 72*a*b^3*Sin[2*e] - 48*b^4*Sin[2*e] - 9*a^4*Sin[2*f*x] - 13*a^3*b*Sin[2*f*x] + 28*a
^2*b^2*Sin[2*f*x] + 32*a*b^3*Sin[2*f*x] + 3*a^4*Sin[4*e + 2*f*x] - a^3*b*Sin[4*e + 2*f*x] - 20*a^2*b^2*Sin[4*e
 + 2*f*x] - 16*a*b^3*Sin[4*e + 2*f*x] - 3*a^4*Sin[2*e + 4*f*x] + 3*a^3*b*Sin[2*e + 4*f*x] + 6*a^2*b^2*Sin[2*e
+ 4*f*x]))/(128*a^3*b^2*f*(a + b*Sec[e + f*x]^2)^3)

________________________________________________________________________________________

Maple [B]  time = 0.106, size = 356, normalized size = 2.4 \begin{align*} -{\frac{\arctan \left ( \tan \left ( fx+e \right ) \right ) }{f{a}^{3}}}-{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{8\,fa \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}-{\frac{5\, \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{8\,f \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}b}}-{\frac{3\,a\tan \left ( fx+e \right ) }{8\,f \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}{b}^{2}}}-{\frac{\tan \left ( fx+e \right ) }{4\,f \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}b}}+{\frac{5\,\tan \left ( fx+e \right ) }{8\,fa \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{3}{8\,f{b}^{2}}\arctan \left ({\tan \left ( fx+e \right ) b{\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}}-{\frac{1}{8\,fab}\arctan \left ({\tan \left ( fx+e \right ) b{\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}}+{\frac{1}{2\,f{a}^{2}}\arctan \left ({\tan \left ( fx+e \right ) b{\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}}+{\frac{b \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{2\,f{a}^{2} \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{\tan \left ( fx+e \right ) b}{2\,f{a}^{2} \left ( a+b+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) ^{2}}}+{\frac{b}{f{a}^{3}}\arctan \left ({\tan \left ( fx+e \right ) b{\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(f*x+e)^6/(a+b*sec(f*x+e)^2)^3,x)

[Out]

-1/f/a^3*arctan(tan(f*x+e))-1/8/f/a/(a+b+b*tan(f*x+e)^2)^2*tan(f*x+e)^3-5/8/f/(a+b+b*tan(f*x+e)^2)^2/b*tan(f*x
+e)^3-3/8/f*a/(a+b+b*tan(f*x+e)^2)^2/b^2*tan(f*x+e)-1/4/f/(a+b+b*tan(f*x+e)^2)^2/b*tan(f*x+e)+5/8*tan(f*x+e)/a
/f/(a+b+b*tan(f*x+e)^2)^2+3/8/f/b^2/((a+b)*b)^(1/2)*arctan(tan(f*x+e)*b/((a+b)*b)^(1/2))-1/8/f/a/b/((a+b)*b)^(
1/2)*arctan(tan(f*x+e)*b/((a+b)*b)^(1/2))+1/2/f/a^2/((a+b)*b)^(1/2)*arctan(tan(f*x+e)*b/((a+b)*b)^(1/2))+1/2/f
/a^2*b/(a+b+b*tan(f*x+e)^2)^2*tan(f*x+e)^3+1/2*b*tan(f*x+e)/a^2/f/(a+b+b*tan(f*x+e)^2)^2+1/f/a^3*b/((a+b)*b)^(
1/2)*arctan(tan(f*x+e)*b/((a+b)*b)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^6/(a+b*sec(f*x+e)^2)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 0.677676, size = 1519, normalized size = 10.33 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^6/(a+b*sec(f*x+e)^2)^3,x, algorithm="fricas")

[Out]

[-1/32*(32*a^2*b^2*f*x*cos(f*x + e)^4 + 64*a*b^3*f*x*cos(f*x + e)^2 + 32*b^4*f*x - ((3*a^4 - 4*a^3*b + 8*a^2*b
^2)*cos(f*x + e)^4 + 3*a^2*b^2 - 4*a*b^3 + 8*b^4 + 2*(3*a^3*b - 4*a^2*b^2 + 8*a*b^3)*cos(f*x + e)^2)*sqrt(-(a
+ b)/b)*log(((a^2 + 8*a*b + 8*b^2)*cos(f*x + e)^4 - 2*(3*a*b + 4*b^2)*cos(f*x + e)^2 - 4*((a*b + 2*b^2)*cos(f*
x + e)^3 - b^2*cos(f*x + e))*sqrt(-(a + b)/b)*sin(f*x + e) + b^2)/(a^2*cos(f*x + e)^4 + 2*a*b*cos(f*x + e)^2 +
 b^2)) + 4*(3*(a^4 - a^3*b - 2*a^2*b^2)*cos(f*x + e)^3 + (5*a^3*b + a^2*b^2 - 4*a*b^3)*cos(f*x + e))*sin(f*x +
 e))/(a^5*b^2*f*cos(f*x + e)^4 + 2*a^4*b^3*f*cos(f*x + e)^2 + a^3*b^4*f), -1/16*(16*a^2*b^2*f*x*cos(f*x + e)^4
 + 32*a*b^3*f*x*cos(f*x + e)^2 + 16*b^4*f*x + ((3*a^4 - 4*a^3*b + 8*a^2*b^2)*cos(f*x + e)^4 + 3*a^2*b^2 - 4*a*
b^3 + 8*b^4 + 2*(3*a^3*b - 4*a^2*b^2 + 8*a*b^3)*cos(f*x + e)^2)*sqrt((a + b)/b)*arctan(1/2*((a + 2*b)*cos(f*x
+ e)^2 - b)*sqrt((a + b)/b)/((a + b)*cos(f*x + e)*sin(f*x + e))) + 2*(3*(a^4 - a^3*b - 2*a^2*b^2)*cos(f*x + e)
^3 + (5*a^3*b + a^2*b^2 - 4*a*b^3)*cos(f*x + e))*sin(f*x + e))/(a^5*b^2*f*cos(f*x + e)^4 + 2*a^4*b^3*f*cos(f*x
 + e)^2 + a^3*b^4*f)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)**6/(a+b*sec(f*x+e)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 4.87869, size = 285, normalized size = 1.94 \begin{align*} -\frac{\frac{8 \,{\left (f x + e\right )}}{a^{3}} - \frac{{\left (3 \, a^{3} - a^{2} b + 4 \, a b^{2} + 8 \, b^{3}\right )}{\left (\pi \left \lfloor \frac{f x + e}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (b\right ) + \arctan \left (\frac{b \tan \left (f x + e\right )}{\sqrt{a b + b^{2}}}\right )\right )}}{\sqrt{a b + b^{2}} a^{3} b^{2}} + \frac{5 \, a^{2} b \tan \left (f x + e\right )^{3} + a b^{2} \tan \left (f x + e\right )^{3} - 4 \, b^{3} \tan \left (f x + e\right )^{3} + 3 \, a^{3} \tan \left (f x + e\right ) + 2 \, a^{2} b \tan \left (f x + e\right ) - 5 \, a b^{2} \tan \left (f x + e\right ) - 4 \, b^{3} \tan \left (f x + e\right )}{{\left (b \tan \left (f x + e\right )^{2} + a + b\right )}^{2} a^{2} b^{2}}}{8 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^6/(a+b*sec(f*x+e)^2)^3,x, algorithm="giac")

[Out]

-1/8*(8*(f*x + e)/a^3 - (3*a^3 - a^2*b + 4*a*b^2 + 8*b^3)*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(
f*x + e)/sqrt(a*b + b^2)))/(sqrt(a*b + b^2)*a^3*b^2) + (5*a^2*b*tan(f*x + e)^3 + a*b^2*tan(f*x + e)^3 - 4*b^3*
tan(f*x + e)^3 + 3*a^3*tan(f*x + e) + 2*a^2*b*tan(f*x + e) - 5*a*b^2*tan(f*x + e) - 4*b^3*tan(f*x + e))/((b*ta
n(f*x + e)^2 + a + b)^2*a^2*b^2))/f